﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Donwu
    {
        protected int leg;
        public int Leg
        {
            get { return this.leg; }
            set { this.leg = value; }
        }
        public void Tui()
        {
            Console.WriteLine("我有{0}条腿",this.leg); 
        }
        public virtual void Eat()
        {
            Console.Write("我会吃");
        }
        public void Sleep()
        {
            Console.WriteLine("我能睡");
        }
        public Donwu() { }
        public Donwu(int leg) 
        {
            this.leg = leg; 
        }
    }
}
